<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="Enum">
using System;
using System.Collections.Generic;

namespace <xsl:value-of select="HeaderInfo/ProjectName"/>.DataObject {
	public enum  <xsl:value-of select="Name"/> : int {
		<xsl:for-each select="Names/string">
<xsl:if test="position()=count(/Enum/Names/string)"><xsl:value-of select="."/></xsl:if>
<xsl:if test="position()!=count(/Enum/Names/string)"><xsl:value-of select="."/>,</xsl:if>
		</xsl:for-each>
	}
	
	
		
	
	public class <xsl:value-of select="Name"/>DOS {
		
		public EnumSelection[] Select() 
		{
			List&lt;EnumSelection&gt; enums = new List&lt;EnumSelection&gt;();
		
			string[] values =  Enum.GetNames ( typeof ( <xsl:value-of select="Name"/> ) );
			
			for ( int x = 0; x &lt; values.Length; x ++ )
			{
				enums.Add ( new EnumSelection ( values [ x ] , x ) );
			}
			
			return enums.ToArray ();
		}
		
	}
}
	</xsl:template>
</xsl:stylesheet>

  